<?php
// +----------------------------------------------------------------------
// | 海豚PHP框架 [ DolphinPHP ]
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 河源市卓锐科技有限公司 [ http://www.zrthink.com ]
// +----------------------------------------------------------------------
// | 官方网站: http://dolphinphp.com
// +----------------------------------------------------------------------
// | 开源协议 ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------

namespace app\member\validate;

use think\Validate;

/**
 * 行为验证器
 * @package app\admin\validate
 * @author 蔡伟明 <314013107@qq.com>
 */
class Memberedit extends Validate
{
    //定义验证规则
    protected $rule = [
        'company|公司名称'   => 'require|unique:Member',
        'email|邮箱'     => 'require|email|unique:Member',
        'mobile|手机号'   => 'require|regex:^1[0-9]{10}$|unique:Member',
        'tel|固话'   => 'regex:0\d{2,3}-\d{5,9}|0\d{2,3}-\d{5,9}|unique:Member',

    ];

    //定义验证提示
    protected $message = [


    ];
    //定义验证场景
    protected $scene = [
        'company'  => ['company'],
        'email'  => ['email'],
        'mobile' => ['mobile'],
        'tel' => ['tel'],
    ];
}
